package beans;

import java.io.Serializable;

public class User implements Serializable {
    //primary key
    private String account;//use email

    private String username;
    private String passwd;
    private int isVIP;//0代表不是VIP，1代表是VIP

    public User() {
        this.isVIP = 0;
    }

    public User(String account, String username, String passwd) {
        this.account = account;
        this.username = username;
        this.passwd = passwd;
        this.isVIP = 0;
    }

    public User(String account, String username, String passwd, int isVIP) {
        this.account = account;
        this.username = username;
        this.passwd = passwd;
        this.isVIP = isVIP;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    public int getIsVIP() {
        return isVIP;
    }

    public void setIsVIP(int isVIP) {
        this.isVIP = isVIP;
    }

    @Override
    public String toString() {
        return username;
    }
}
